home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / git-4.3 / git-4 / git-4.3.11 / configure.in < prev    next >
Encoding:
Text File  |  1996-06-06  |  20.1 KB  |  728 lines

  1.  
  2. dnl ###########################################################################
  3. dnl #                                          #
  4. dnl #            Autoconf input file for GNU Interactive Tools 4.3.11          #
  5. dnl #   Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.   #
  6. dnl #                                          #
  7. dnl ###########################################################################
  8.  
  9.  
  10. dnl #################################
  11. dnl # Initializing autoconf stuff.  #
  12. dnl #################################
  13.  
  14. AC_REVISION($Revision: 4.3.11 $)
  15. AC_INIT(src/git.c)
  16. AC_CONFIG_HEADER(config.h)
  17. AC_PREREQ(2.9)
  18.  
  19.  
  20. dnl ################################################
  21. dnl # Set up the product name and version number.  #
  22. dnl ################################################
  23.  
  24. PRODUCT="GNU Interactive Tools"
  25. VERSION="4.3.11"
  26.  
  27.  
  28. dnl ###################
  29. dnl # The message...  #
  30. dnl ###################
  31.  
  32. echo
  33. echo
  34. echo "                ############################################"
  35. echo "                # Configuring GNU Interactive Tools 4.3.11 #"
  36. echo "                ############################################"
  37. echo
  38. echo
  39. echo "     ******************************************************************"
  40. echo "     *     WARNING: some old losing shells fail to run './configure', *"
  41. echo "     * trying to execute configure itself.  You can prevent  this  by *"
  42. echo "     * running 'sh configure'.  The configure script will be executed *"
  43. echo "     * by /bin/sh.                                                    *"
  44. echo "     ******************************************************************"
  45. echo
  46. echo
  47. echo "     ******************************************************************"
  48. echo "     *     If you find bugs in this software or in  the  installation *"
  49. echo "     * procedure please send a description to tudorh@pub.ro.          *"
  50. echo "     ******************************************************************"
  51. echo
  52. echo
  53.  
  54. echo "5 seconds delay..."
  55. sleep 5
  56. echo
  57.  
  58.  
  59. dnl ################################################
  60. dnl # Check for a BSD compatible install program.  #
  61. dnl ################################################
  62.  
  63. AC_PROG_INSTALL
  64.  
  65. dnl #########################################
  66. dnl # Check for the canonical system name.  #
  67. dnl #########################################
  68.  
  69. AC_CANONICAL_HOST
  70.  
  71. HOST=$host
  72.  
  73.  
  74. dnl ###################################################################
  75. dnl # Checking the system type. We are especially looking for Linux.  #
  76. dnl ###################################################################
  77.  
  78. if test "$host_os" = "linux"; then
  79.     AC_DEFINE(HAVE_LINUX)
  80. else
  81.     if test `echo "$host_os" | cut -c1-4` = "hpux"; then
  82.     AC_DEFINE(HAVE_HPUX)
  83.     fi
  84. fi
  85.  
  86.  
  87. dnl #############################
  88. dnl # Checking the C compiler.  #
  89. dnl #############################
  90.  
  91. AC_PROG_CC
  92.  
  93.  
  94. dnl ######################################
  95. dnl # Check the command line arguments.  #
  96. dnl ######################################
  97.  
  98. AC_ARG_WITH(terminfo,
  99.     [  --with-terminfo         use terminfo insted of termcap],
  100.     TERMINFO="$withval",
  101.     TERMINFO="no")
  102.  
  103. AC_ARG_ENABLE(gcc-warnings,
  104.     [  --enable-gcc-warnings   more gcc warnings for debugging purposes],
  105.     GCC_WARNINGS="$enableval",
  106.     GCC_WARNINGS="no")
  107.  
  108. dnl #####################################################################
  109. dnl # Increase the warnings level if using GNU C.            #
  110. dnl #####################################################################
  111.  
  112. if test "$CC" = "gcc"; then
  113.     AC_DEFINE(HAVE_GCC)
  114.     CFLAGS="$CFLAGS -Wall";
  115.     if test "$GCC_WARNINGS" = "yes"; then
  116.     CFLAGS="$CFLAGS -Waggregate-return -Wbad-function-cast -Wcast-align\
  117.             -Wtraditional -Winline -Wpointer-arith -Wcast-qual";
  118.     fi
  119. fi
  120.  
  121.  
  122. dnl ########################################################################
  123. dnl # Checking for some UNIX variants.  These ones need special treatement #
  124. dnl # due to exceptional oddities in their header files or libraries.       #
  125. dnl ########################################################################
  126.  
  127. AC_AIX
  128. AC_ISC_POSIX
  129. AC_MINIX
  130. AC_CHECK_LIB(sun, getpwnam)
  131.  
  132.  
  133. dnl #################################
  134. dnl # Checking the C preprocessor.  #
  135. dnl #################################
  136.  
  137. AC_PROG_CPP
  138.  
  139.  
  140. dnl ##########################################
  141. dnl # Checking for standard C header files.  #
  142. dnl ##########################################
  143.  
  144. AC_HEADER_STDC
  145. AC_CHECK_HEADERS(unistd.h stdlib.h string.h memory.h values.h)
  146.  
  147.  
  148. dnl ################################################
  149. dnl # Checking for system dependent header files.  #
  150. dnl ################################################
  151.  
  152. AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/vfs.h sys/filsys.h fcntl.h)
  153. AC_CHECK_HEADERS(sys/statfs.h sys/dustat.h sys/statvfs.h)
  154.  
  155.  
  156. dnl ###################################################################
  157. dnl # Checking for system specific directory functions declarations.  #
  158. dnl ###################################################################
  159.  
  160. AC_HEADER_DIRENT
  161.  
  162.  
  163. dnl ####################################################################
  164. dnl # Checking whether the C compiler do support the 'const' keyword.  #
  165. dnl ####################################################################
  166.  
  167. AC_C_CONST
  168.  
  169.  
  170. dnl ###############################################################
  171. dnl # Checking for predefined C types.  Fixing when necessary...  #
  172. dnl ###############################################################
  173.  
  174. AC_TYPE_SIGNAL
  175. AC_TYPE_PID_T
  176. AC_TYPE_UID_T
  177. AC_TYPE_MODE_T
  178. AC_TYPE_SIZE_T
  179.  
  180.  
  181. dnl ###################################################
  182. dnl # Checking how to include time.h and sys/time.h.  #
  183. dnl ###################################################
  184.  
  185. AC_CHECK_HEADERS(sys/time.h)
  186. AC_HEADER_TIME
  187.  
  188.  
  189. dnl #########################################################################
  190. dnl # Checking whether the system supports long file names.  GIT will issue #
  191. dnl # a warning at run time if long file names are not supported.        #
  192. dnl #########################################################################
  193.  
  194. AC_SYS_LONG_FILE_NAMES
  195.  
  196.  
  197. dnl ####################################
  198. dnl # Checking the sys/stat.h macros.  #
  199. dnl ####################################
  200.  
  201. AC_HEADER_STAT
  202.  
  203.  
  204. dnl ##################################################################
  205. dnl # Checking whether the system supports the lstat() system call.  #
  206. dnl ##################################################################
  207.  
  208. AC_CHECK_FUNCS(lstat)
  209.  
  210.  
  211. dnl ########################################################################
  212. dnl # Checking for the presence of the strerror().  This function is a new #
  213. dnl # feature of ANSI C and many older C systems do not support it yet.    #
  214. dnl ########################################################################
  215.  
  216. AC_CHECK_FUNCS(strerror)
  217.  
  218.  
  219. dnl ####################################################################
  220. dnl # Checking for the presence of the strcasecmp().  This function is #
  221. dnl # derived from BSD 4.3 and other systems might not have it.           #
  222. dnl ####################################################################
  223.  
  224. AC_CHECK_FUNCS(strcasecmp)
  225.  
  226.  
  227. dnl ####################################################################
  228. dnl # Checking for the presence of the strcasecmp().  This function is #
  229. dnl # a GNU extension so only a few systems support it.     Too bad :-(   #
  230. dnl ####################################################################
  231.  
  232. AC_CHECK_FUNCS(strncasecmp)
  233.  
  234.  
  235. dnl #################################################################
  236. dnl # Checking for the presence of the strstr().  Older BSD systems #
  237. dnl # might not have it.                                            #
  238. dnl #################################################################
  239.  
  240. AC_CHECK_FUNCS(strstr)
  241.  
  242.  
  243. dnl ##################################################################
  244. dnl # Checking for the presence of the memmove().  Older BSD systems #
  245. dnl # might not have it.                                             #
  246. dnl ##################################################################
  247.  
  248. AC_CHECK_FUNCS(memmove)
  249.  
  250.  
  251. dnl #################################################################
  252. dnl # Checking for the presence of the putenv().  Older BSD systems #
  253. dnl # might not have it.                                            #
  254. dnl #################################################################
  255.  
  256. AC_CHECK_FUNCS(putenv)
  257.  
  258.  
  259. dnl #################################################################
  260. dnl # Checking for the presence of the setenv().  Older BSD systems #
  261. dnl # might use it instead of putenv.                               #
  262. dnl #################################################################
  263.  
  264. AC_CHECK_FUNCS(setenv)
  265.  
  266.  
  267. dnl #################################################################
  268. dnl # Checking for the presence of the getcwd().  Older BSD systems #
  269. dnl # might not have it.                                            #
  270. dnl #################################################################
  271.  
  272. AC_CHECK_FUNCS(getcwd)
  273.  
  274.  
  275. dnl ########################################################################
  276. dnl # This configure.in code has been stolen from GNU fileutils-3.12.  Its #
  277. dnl # job is to detect a method to get file system information.               #
  278. dnl ########################################################################
  279.  
  280. AC_CHECKING(how to get filesystem space usage)
  281. space=no
  282.  
  283. # Here we'll compromise a little (and perform only the link test)
  284. # since it seems there are no variants of the statvfs function.
  285. if test $space = no; then
  286.   # SVR4
  287.   AC_CHECK_FUNCS(statvfs)
  288.   if test $ac_cv_func_statvfs = yes; then
  289.     space=yes
  290.     AC_DEFINE(STAT_STATVFS)
  291.   fi
  292. fi
  293.  
  294. if test $space = no; then
  295.   # DEC Alpha running OSF/1
  296.   AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
  297.   AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
  298.   [AC_TRY_RUN([
  299. #include <sys/param.h>
  300. #include <sys/types.h>
  301. #include <sys/mount.h>
  302.   main ()
  303.   {
  304.     struct statfs fsd;
  305.     fsd.f_fsize = 0;
  306.     exit (statfs (".", &fsd, sizeof (struct statfs)));
  307.   }],
  308.   fu_cv_sys_stat_statfs3_osf1=yes,
  309.   fu_cv_sys_stat_statfs3_osf1=no,
  310.   fu_cv_sys_stat_statfs3_osf1=no)])
  311.   AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
  312.   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
  313.     space=yes
  314.     AC_DEFINE(STAT_STATFS3_OSF1)
  315.   fi
  316. fi
  317.  
  318. if test $space = no; then
  319. # AIX
  320.   AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
  321. member (AIX, 4.3BSD)])
  322.   AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
  323.   [AC_TRY_RUN([
  324. #ifdef HAVE_SYS_PARAM_H
  325. #include <sys/param.h>
  326. #endif
  327. #ifdef HAVE_SYS_MOUNT_H
  328. #include <sys/mount.h>
  329. #endif
  330. #ifdef HAVE_SYS_VFS_H
  331. #include <sys/vfs.h>
  332. #endif
  333.   main ()
  334.   {
  335.   struct statfs fsd;
  336.   fsd.f_bsize = 0;
  337.   exit (statfs (".", &fsd));
  338.   }],
  339.   fu_cv_sys_stat_statfs2_bsize=yes,
  340.   fu_cv_sys_stat_statfs2_bsize=no,
  341.   fu_cv_sys_stat_statfs2_bsize=no)])
  342.   AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
  343.   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
  344.     space=yes
  345.     AC_DEFINE(STAT_STATFS2_BSIZE)
  346.   fi
  347. fi
  348.  
  349. if test $space = no; then
  350. # SVR3
  351.   AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
  352.   AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
  353.   [AC_TRY_RUN([#include <sys/types.h>
  354. #include <sys/statfs.h>
  355.   main ()
  356.   {
  357.   struct statfs fsd;
  358.   exit (statfs (".", &fsd, sizeof fsd, 0));
  359.   }],
  360.     fu_cv_sys_stat_statfs4=yes,
  361.     fu_cv_sys_stat_statfs4=no,
  362.     fu_cv_sys_stat_statfs4=no)])
  363.   AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
  364.   if test $fu_cv_sys_stat_statfs4 = yes; then
  365.     space=yes
  366.     AC_DEFINE(STAT_STATFS4)
  367.   fi
  368. fi
  369.  
  370. if test $space = no; then
  371. # 4.4BSD and NetBSD
  372.   AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
  373. member (4.4BSD and NetBSD)])
  374.   AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
  375.   [AC_TRY_RUN([#include <sys/types.h>
  376. #ifdef HAVE_SYS_PARAM_H
  377. #include <sys/param.h>
  378. #endif
  379. #ifdef HAVE_SYS_MOUNT_H
  380. #include <sys/mount.h>
  381. #endif
  382.   main ()
  383.   {
  384.   struct statfs fsd;
  385.   fsd.f_fsize = 0;
  386.   exit (statfs (".", &fsd));
  387.   }],
  388.   fu_cv_sys_stat_statfs2_fsize=yes,
  389.   fu_cv_sys_stat_statfs2_fsize=no,
  390.   fu_cv_sys_stat_statfs2_fsize=no)])
  391.   AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
  392.   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
  393.     space=yes
  394.     AC_DEFINE(STAT_STATFS2_FSIZE)
  395.   fi
  396. fi
  397.  
  398. if test $space = no; then
  399.   # Ultrix
  400.   AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
  401.   AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
  402.   [AC_TRY_RUN([#include <sys/types.h>
  403. #ifdef HAVE_SYS_PARAM_H
  404. #include <sys/param.h>
  405. #endif
  406. #ifdef HAVE_SYS_MOUNT_H
  407. #include <sys/mount.h>
  408. #endif
  409. #ifdef HAVE_SYS_FS_TYPES_H
  410. #include <sys/fs_types.h>
  411. #endif
  412.   main ()
  413.   {
  414.   struct fs_data fsd;
  415.   /* Ultrix's statfs returns 1 for success,
  416.      0 for not mounted, -1 for failure.  */
  417.   exit (statfs (".", &fsd) != 1);
  418.   }],
  419.   fu_cv_sys_stat_fs_data=yes,
  420.   fu_cv_sys_stat_fs_data=no,
  421.   fu_cv_sys_stat_fs_data=no)])
  422.   AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
  423.   if test $fu_cv_sys_stat_fs_data = yes; then
  424.     space=yes
  425.     AC_DEFINE(STAT_STATFS2_FS_DATA)
  426.   fi
  427. fi
  428.  
  429. dnl Not supported
  430. dnl if test $space = no; then
  431. dnl # SVR2
  432. dnl AC_TRY_CPP([#include <sys/filsys.h>],
  433. dnl   AC_DEFINE(STAT_READ_FILSYS) space=yes)
  434. dnl fi
  435.  
  436.  
  437. dnl ###########################################################################
  438. dnl # If the GNU readline library is installed on the system, we will use its #
  439. dnl # tilde_expand() and history functions.  Otherwise, we have  to  use  the #
  440. dnl # versions of tilde.c and history.c included in the package.  These files #
  441. dnl # belong to the GNU readline library version 2.0.1.                  #
  442. dnl ###########################################################################
  443.  
  444. AC_CHECK_LIB(readline, tilde_expand)
  445. AC_FUNC_CHECK(tilde_expand,,
  446.           GIT_OBJS="$GIT_OBJS tilde.o"
  447.           GITPS_OBJS="$GITPS_OBJS tilde.o"
  448.           GITVIEW_OBJS="$GITVIEW_OBJS tilde.o")
  449. AC_FUNC_CHECK(using_history,,
  450.           GIT_OBJS="$GIT_OBJS history.o")
  451.  
  452.  
  453. dnl ####################################################
  454. dnl # Checking if ioctl(1, TIOCGWINSZ, &winsz) works.  #
  455. dnl ####################################################
  456.  
  457. AC_MSG_CHECKING([for struct winsz])
  458.  
  459. AC_CACHE_VAL(git_cv_struct_winsz,
  460.     git_cv_struct_winsz="no"
  461.     AC_TRY_LINK(
  462.     [#include <sys/types.h>
  463.      #include <sys/ioctl.h>
  464.      #if defined TIOCGSIZE && !defined TIOCGWINSZ
  465.      #define TIOCGWINSZ TIOCGSIZE
  466.      #endif],
  467.     [{
  468.         struct winsize winsz;
  469.         ioctl(1, TIOCGWINSZ, &winsz);
  470.         winsz.ws_col = winsz.ws_row;
  471.     }],
  472.     git_cv_struct_winsz="yes"
  473.     )
  474. )
  475.  
  476. if test "$git_cv_struct_winsz" = "yes"; then
  477.     AC_DEFINE(HAVE_WINSZ)
  478. fi
  479.  
  480. AC_MSG_RESULT([$git_cv_struct_winsz])
  481.  
  482.  
  483. dnl ######################################################################
  484. dnl # Checking for compilers that do not support constructs combinations #
  485. dnl # of ANSI C like prototypes & K&R definitions.  For B.O.S. systems.     #
  486. dnl ######################################################################
  487.  
  488. AC_MSG_CHECKING([for dumb C compiler])
  489.  
  490. AC_CACHE_VAL(git_cv_dumb_cc,
  491.     git_cv_dumb_cc="yes"
  492.     AC_TRY_LINK(
  493.     [void tst(char);
  494.      void tst(i)
  495.          char i;
  496.      {}],
  497.     [{
  498.         tst('A');
  499.     }],
  500.     git_cv_dumb_cc="no"
  501.     )
  502. )
  503.  
  504. if test "$git_cv_dumb_cc" = "yes"; then
  505.     AC_DEFINE(HAVE_DUMB_CC)
  506. fi
  507.  
  508. AC_MSG_RESULT([$git_cv_dumb_cc])
  509.  
  510.  
  511. dnl #############################################
  512. dnl # Checking if struct utsname is available.  #
  513. dnl #############################################
  514.  
  515. AC_MSG_CHECKING([for struct utsname])
  516.  
  517. AC_CACHE_VAL(git_cv_struct_utsname,
  518.     git_cv_struct_utsname="no"
  519.     AC_TRY_LINK(
  520.     [#include <sys/utsname.h>],
  521.     [{
  522.         char *ptr;
  523.         struct utsname u;
  524.  
  525.         uname(&u);
  526.         ptr = u.nodename;
  527.         ptr = u.sysname;
  528.         ptr = u.machine;
  529.     }],
  530.     git_cv_struct_utsname="yes"
  531.     )
  532. )
  533.  
  534. if test "$git_cv_struct_utsname" = "yes"; then
  535.     AC_DEFINE(HAVE_UTSNAME)
  536. fi
  537.  
  538. AC_MSG_RESULT([$git_cv_struct_utsname])
  539.  
  540.  
  541. dnl ######################################################
  542. dnl # Checking for POSIX compatible terminal interface.  #
  543. dnl ######################################################
  544.  
  545. AC_MSG_CHECKING([for POSIX compatible terminal interface])
  546.  
  547. AC_CACHE_VAL(git_cv_sys_posix_tty,
  548.     git_cv_sys_posix_tty="no"
  549.     AC_TRY_LINK(
  550.     [#include <termios.h>],
  551.     [{
  552.         struct termios term;
  553.  
  554.         tcgetattr(0, &term);
  555.     }],
  556.     git_cv_sys_posix_tty="yes"
  557.     )
  558. )
  559.  
  560. if test "$git_cv_sys_posix_tty" = "yes"; then
  561.     AC_DEFINE(HAVE_POSIX_TTY)
  562. fi
  563.  
  564. AC_MSG_RESULT([$git_cv_sys_posix_tty])
  565.  
  566.  
  567. dnl #########################################################
  568. dnl # Checking for System V compatible terminal interface.  #
  569. dnl #########################################################
  570.  
  571. AC_MSG_CHECKING([for System V compatible terminal interface])
  572.  
  573. AC_CACHE_VAL(git_cv_sys_systemv_tty,
  574.     git_cv_sys_systemv_tty="no"
  575.     AC_TRY_LINK(
  576.     [#include <termio.h>],
  577.     [{
  578.         struct termio term;
  579.  
  580.         ioctl(0, TCGETA, &term);
  581.     }],
  582.     git_cv_sys_systemv_tty="yes"
  583.     )
  584. )
  585.  
  586. if test "$git_cv_sys_systemv_tty" = "yes"; then
  587.     AC_DEFINE(HAVE_SYSTEMV_TTY)
  588. fi
  589.  
  590. AC_MSG_RESULT([$git_cv_sys_systemv_tty])
  591.  
  592.  
  593. dnl ####################################################
  594. dnl # Checking for BSD compatible terminal interface.  #
  595. dnl ####################################################
  596.  
  597. AC_MSG_CHECKING([for BSD compatible terminal interface])
  598.  
  599. AC_CACHE_VAL(git_cv_sys_bsd_tty,
  600.     git_cv_sys_bsd_tty="no"
  601.     AC_TRY_LINK(
  602.     [#include <sgtty.h>],
  603.     [{
  604.         struct sgttyb arg;
  605.         struct tchars targ;
  606.         struct ltchars ltarg;
  607.  
  608.         ioctl(0, TIOCGETP,&arg);
  609.         ioctl(0, TIOCGETC,&targ);
  610.         ioctl(0, TIOCGLTC,<arg);
  611.     }],
  612.     git_cv_sys_bsd_tty="yes"
  613.     )
  614. )
  615.  
  616. if test "$git_cv_sys_bsd_tty" = "yes"; then
  617.     AC_DEFINE(HAVE_BSD_TTY)
  618. fi
  619.  
  620. AC_MSG_RESULT([$git_cv_sys_bsd_tty])
  621.  
  622.  
  623. dnl #######################################################
  624. dnl # Checking the terminal capabilities library to use.  #
  625. dnl #######################################################
  626.  
  627. define(git_TERMINFO_LIBRARY,
  628. [    AC_CHECK_LIB(ncurses, tgetent, AC_DEFINE(HAVE_LIBTERMINFO)
  629.                  LIBS="$LIBS -lncurses"
  630.                  TERMLIB_FOUND="yes",
  631.     AC_CHECK_LIB(termlib, tgetent, AC_DEFINE(HAVE_LIBTERMINFO)
  632.                     LIBS="$LIBS -ltermlib"
  633.                     TERMLIB_FOUND="yes",
  634.         AC_CHECK_LIB(curses, tgetent, AC_DEFINE(HAVE_LIBTERMINFO)
  635.                        LIBS="$LIBS -lcurses"
  636.                        TERMLIB_FOUND="yes",
  637.         AC_CHECK_LIB(tinfo, tgetent, AC_DEFINE(HAVE_LIBTERMINFO)
  638.                       LIBS="$LIBS -ltinfo"
  639.                       TERMLIB_FOUND="yes",
  640.             AC_CHECK_LIB(terminfo, tgetent, AC_DEFINE(HAVE_LIBTERMINFO)
  641.                          LIBS="$LIBS -lterminfo"
  642.                          TERMLIB_FOUND="yes",
  643.             TERMLIB_FOUND="no"
  644.             )
  645.         )
  646.         )
  647.     )
  648.     )
  649. ]
  650. )dnl
  651.  
  652. if test "$TERMINFO" = "yes"; then
  653.     git_TERMINFO_LIBRARY
  654.     if test "$TERMLIB_FOUND" = "no"; then
  655.     AC_CHECK_LIB(termcap, tgetent,
  656.              AC_DEFINE(HAVE_LIBTERMCAP)
  657.              LIBS="$LIBS -ltermcap"
  658.              TERMLIB_FOUND="yes")
  659.     fi
  660. else
  661.     AC_CHECK_LIB(termcap, tgetent,
  662.          AC_DEFINE(HAVE_LIBTERMCAP)
  663.          LIBS="$LIBS -ltermcap"
  664.          TERMLIB_FOUND="yes",
  665.          git_TERMINFO_LIBRARY)
  666. fi
  667.  
  668. if test "$TERMLIB_FOUND" = "no"; then
  669.     AC_MSG_ERROR([no library for handling terminal capabilities])
  670. fi
  671.  
  672.  
  673. dnl #######################################################################
  674. dnl # Checking the makeinfo utility.  If we can't find it, we can't build #
  675. dnl # build the info documentation.                          #
  676. dnl #######################################################################
  677.  
  678. AC_PROGRAM_CHECK(MAKEINFO, makeinfo, makeinfo, false)
  679. if test "$MAKEINFO" = "false"; then
  680.     AC_MSG_WARN(***** makeinfo utility not found *****)
  681. fi
  682.  
  683.  
  684. dnl #######################################################################
  685. dnl # Checking the texi2dvi utility.  If we can't find it, we can't build #
  686. dnl # build the dvi documentation.                          #
  687. dnl #######################################################################
  688.  
  689. AC_PROGRAM_CHECK(TEXI2DVI, texi2dvi, texi2dvi, false)
  690. if test "$TEXI2DVI" = "false"; then
  691.     AC_MSG_WARN(***** texi2dvi utility not found *****)
  692. fi
  693.  
  694.  
  695. dnl ##########################################################################
  696. dnl # According to Joachim Baumann, for Solaris 2.3 & Solaris 2.4 (at least) #
  697. dnl # -lucb should be included after -ltermcap.  This has not been tested !! #
  698. dnl ##########################################################################
  699.  
  700. if test "$TERMINFO" = "no"; then
  701.     if test "$host_os" = "solaris2.3" -o "$host_os" = "solaris2.4"; then
  702.     AC_CHECK_LIB(ucb, tgetent, , , $LIBS)
  703.     fi
  704. fi
  705.  
  706. dnl #######################################
  707. dnl # Make final variable substitutions.  #
  708. dnl #######################################
  709.  
  710. AC_SUBST(PRODUCT)dnl
  711. AC_SUBST(VERSION)dnl
  712. AC_SUBST(HOST)dnl
  713. AC_SUBST(INSTALL)dnl
  714. AC_SUBST(INSTALL_PROGRAM)dnl
  715. AC_SUBST(INSTALL_DATA)dnl
  716. AC_SUBST(CFLAGS)dnl
  717. AC_SUBST(GIT_OBJS)dnl
  718. AC_SUBST(GITPS_OBJS)dnl
  719. AC_SUBST(GITVIEW_OBJS)dnl
  720.  
  721.  
  722. dnl ##########
  723. dnl # Done.  #
  724. dnl ##########
  725.  
  726. AC_OUTPUT(Makefile src/Makefile info/Makefile man/Makefile term/Makefile
  727.       version.h)
  728.